Optimal. Leaf size=188 \[ -\frac {i \sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{(c-i d)^{5/2} f}-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}-\frac {2 (5 c+i d) d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right )^2 f \sqrt {c+d \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 188, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3642, 3679, 12,
3625, 214} \begin {gather*} -\frac {2 d (5 c+i d) \sqrt {a+i a \tan (e+f x)}}{3 f \left (c^2+d^2\right )^2 \sqrt {c+d \tan (e+f x)}}-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 f \left (c^2+d^2\right ) (c+d \tan (e+f x))^{3/2}}-\frac {i \sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f (c-i d)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 214
Rule 3625
Rule 3642
Rule 3679
Rubi steps
\begin {align*} \int \frac {\sqrt {a+i a \tan (e+f x)}}{(c+d \tan (e+f x))^{5/2}} \, dx &=-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}+\frac {2 \int \frac {\sqrt {a+i a \tan (e+f x)} \left (\frac {1}{2} a (3 c+i d)-a d \tan (e+f x)\right )}{(c+d \tan (e+f x))^{3/2}} \, dx}{3 a \left (c^2+d^2\right )}\\ &=-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}-\frac {2 (5 c+i d) d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right )^2 f \sqrt {c+d \tan (e+f x)}}+\frac {4 \int \frac {3 a^2 (c+i d)^2 \sqrt {a+i a \tan (e+f x)}}{4 \sqrt {c+d \tan (e+f x)}} \, dx}{3 a^2 \left (c^2+d^2\right )^2}\\ &=-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}-\frac {2 (5 c+i d) d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right )^2 f \sqrt {c+d \tan (e+f x)}}+\frac {\int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx}{(c-i d)^2}\\ &=-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}-\frac {2 (5 c+i d) d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right )^2 f \sqrt {c+d \tan (e+f x)}}-\frac {\left (2 i a^2\right ) \text {Subst}\left (\int \frac {1}{a c-i a d-2 a^2 x^2} \, dx,x,\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {a+i a \tan (e+f x)}}\right )}{(c-i d)^2 f}\\ &=-\frac {i \sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{(c-i d)^{5/2} f}-\frac {2 d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^{3/2}}-\frac {2 (5 c+i d) d \sqrt {a+i a \tan (e+f x)}}{3 \left (c^2+d^2\right )^2 f \sqrt {c+d \tan (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(394\) vs. \(2(188)=376\).
time = 4.97, size = 394, normalized size = 2.10 \begin {gather*} \frac {\sqrt {2} \sqrt {e^{i f x}} \left (-\frac {4 d e^{i (e+f x)} \sqrt {1+e^{2 i (e+f x)}} \sqrt {c-\frac {i d \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}} \left (d^2 e^{2 i (e+f x)}+3 c^2 \left (1+e^{2 i (e+f x)}\right )-i c d \left (-3+2 e^{2 i (e+f x)}\right )\right )}{3 (c-i d)^2 (c+i d)^2 \left (-i d \left (-1+e^{2 i (e+f x)}\right )+c \left (1+e^{2 i (e+f x)}\right )\right )^2}-\frac {i \log \left (2 \left (\sqrt {c-i d} e^{i (e+f x)}+\sqrt {1+e^{2 i (e+f x)}} \sqrt {c-\frac {i d \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}}\right )\right )}{(c-i d)^{5/2}}\right ) \sqrt {a+i a \tan (e+f x)}}{\sqrt {\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}} \sqrt {1+e^{2 i (e+f x)}} f \sqrt {\sec (e+f x)} \sqrt {\cos (f x)+i \sin (f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 2447 vs. \(2 (153 ) = 306\).
time = 0.73, size = 2448, normalized size = 13.02
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(2448\) |
default | \(\text {Expression too large to display}\) | \(2448\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 992 vs. \(2 (152) = 304\).
time = 1.05, size = 992, normalized size = 5.28 \begin {gather*} -\frac {8 \, \sqrt {2} {\left ({\left (3 \, c^{2} d - 2 i \, c d^{2} + d^{3}\right )} e^{\left (5 i \, f x + 5 i \, e\right )} + {\left (6 \, c^{2} d + i \, c d^{2} + d^{3}\right )} e^{\left (3 i \, f x + 3 i \, e\right )} + 3 \, {\left (c^{2} d + i \, c d^{2}\right )} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} - 3 \, {\left ({\left (c^{6} - 2 i \, c^{5} d + c^{4} d^{2} - 4 i \, c^{3} d^{3} - c^{2} d^{4} - 2 i \, c d^{5} - d^{6}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, {\left (c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (c^{6} + 2 i \, c^{5} d + c^{4} d^{2} + 4 i \, c^{3} d^{3} - c^{2} d^{4} + 2 i \, c d^{5} - d^{6}\right )} f\right )} \sqrt {-\frac {2 i \, a}{{\left (i \, c^{5} + 5 \, c^{4} d - 10 i \, c^{3} d^{2} - 10 \, c^{2} d^{3} + 5 i \, c d^{4} + d^{5}\right )} f^{2}}} \log \left ({\left ({\left (i \, c^{3} + 3 \, c^{2} d - 3 i \, c d^{2} - d^{3}\right )} f \sqrt {-\frac {2 i \, a}{{\left (i \, c^{5} + 5 \, c^{4} d - 10 i \, c^{3} d^{2} - 10 \, c^{2} d^{3} + 5 i \, c d^{4} + d^{5}\right )} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right )} e^{\left (-i \, f x - i \, e\right )}\right ) + 3 \, {\left ({\left (c^{6} - 2 i \, c^{5} d + c^{4} d^{2} - 4 i \, c^{3} d^{3} - c^{2} d^{4} - 2 i \, c d^{5} - d^{6}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, {\left (c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (c^{6} + 2 i \, c^{5} d + c^{4} d^{2} + 4 i \, c^{3} d^{3} - c^{2} d^{4} + 2 i \, c d^{5} - d^{6}\right )} f\right )} \sqrt {-\frac {2 i \, a}{{\left (i \, c^{5} + 5 \, c^{4} d - 10 i \, c^{3} d^{2} - 10 \, c^{2} d^{3} + 5 i \, c d^{4} + d^{5}\right )} f^{2}}} \log \left ({\left ({\left (-i \, c^{3} - 3 \, c^{2} d + 3 i \, c d^{2} + d^{3}\right )} f \sqrt {-\frac {2 i \, a}{{\left (i \, c^{5} + 5 \, c^{4} d - 10 i \, c^{3} d^{2} - 10 \, c^{2} d^{3} + 5 i \, c d^{4} + d^{5}\right )} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right )} e^{\left (-i \, f x - i \, e\right )}\right )}{6 \, {\left ({\left (c^{6} - 2 i \, c^{5} d + c^{4} d^{2} - 4 i \, c^{3} d^{3} - c^{2} d^{4} - 2 i \, c d^{5} - d^{6}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, {\left (c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (c^{6} + 2 i \, c^{5} d + c^{4} d^{2} + 4 i \, c^{3} d^{3} - c^{2} d^{4} + 2 i \, c d^{5} - d^{6}\right )} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {i a \left (\tan {\left (e + f x \right )} - i\right )}}{\left (c + d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}}{{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________